import request from '@/utils/request';

// 卡片列表
export function getCardList(data) {
  return request({
    url: '/card/cardList',
    data
  });
}

// 卡片录入
export function postCardInput(data) {
  return request({
    url: '/card/cardInput',
    data
  });
}

// 卡片划拨
export function postCardAssign(data) {
  return request({
    url: '/card/cardAssign',
    data
  });
}
// 卡片回拨
export function postCardUnAssign(data) {
  return request({
    url: '/card/cardUnAssign',
    data
  });
}

export function getCards(data) {
  return request({
    url: '/card/getCards',
    data
  });
}

// 卡片详情
export function getInfo(data) {
  return request({
    url: '/card/getInfo',
    data
  });
}

// 卡片激活
export function cardActive(business_code) {
  return request({
    url: '/card/cardActive',
    data: {
      business_code
    }
  });
}

// 同步语音
export function getCardRemoteStatus(business_code) {
  return request({
    url: '/card/getCardRemoteStatus',
    data: {
      business_code
    }
  });
}

/** 同步状态 */
export function isRealname(business_code) {
  return request({
    url: '/card/isRealname',
    data: {
      business_code
    }
  });
}

/** 同步流量 */
export function getCardFlow(business_code) {
  return request({
    url: '/card/getCardFlow',
    data: {
      business_code
    }
  });
}

/** 操作卡片停复机 */
export function switchStatus(business_code, status) {
  return request({
    url: '/card/switchStatus',
    data: {
      business_code,
      status
    }
  });
}

/** 卡片替换 */
export function exchange(from, to) {
  return request({
    url: '/card/exchange',
    data: {
      from,
      to
    }
  });
}
